<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title><%= htmlWebpackPlugin.options.title || 'Hashi UI'%></title>

  <% if (htmlWebpackPlugin.files.favicon) { %>
  <link rel="shortcut icon" href="<%= htmlWebpackPlugin.files.favicon%>">
  <% } %>

  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

  <% for (var css in htmlWebpackPlugin.files.css) { %>
  <link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
  <% } %>

  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta name="apple-mobile-web-app-title" content="Hashi-UI" />
  <meta name="HandheldFriendly" content="True" />
  <meta name="format-detection" content="telephone=no" />
  <meta name="format-detection" content="date=no" />
  <meta name="format-detection" content="address=no" />
  <meta name="format-detection" content="email=no" />

  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1" />

  <% if (htmlWebpackPlugin.options.window) { %>
  <script type="text/javascript">
    <% for (key in htmlWebpackPlugin.options.window) { %>
    window['<%= key %>'] = <%= JSON.stringify(htmlWebpackPlugin.options.window[key]) %>;
    <% } %>
  </script>
  <% } %>

  <% if (htmlWebpackPlugin.options.window) { %>
  <script src="<%= htmlWebpackPlugin.options.window['HASHI_ENDPOINT']%>/config.js"></script>
  <% } else { %>
  <script type="text/javascript" src="config.js"></script>
  <% } %>
  <script type="text/javascript">
    document.write('<base href="' + HASHI_PATH_PREFIX + '" />');
  </script>
</head>
<body>
    <div id="app"></div>
    <!-- This script adds the Roboto font to our project. For more detail go to this site:  http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500 -->
    <script>
    var WebFontConfig = {
      google: { families: [ 'Roboto:400,300,500:latin' ] }
    };

    (function() {
      var wf = document.createElement('script');
      wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
      wf.type = 'text/javascript';
      wf.async = 'true';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(wf, s);
    })();
    </script>

    <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
    <script>
    (function() {
        var script = document.createElement('script');
        var src = window.HASHI_ASSETS_ROOT + ("/<%= htmlWebpackPlugin.files.chunks[chunk].entry %>").replace("//", "/")
        script.src = src
        script.type = 'text/javascript';
        script.async = false

        var s = document.getElementsByTagName('script')[0];
        s.parentNode.appendChild(script, s);
    })();
    </script>
    <% } %>

    <% if (htmlWebpackPlugin.options.devServer) { %>
    <script src="<%= htmlWebpackPlugin.options.devServer%>/webpack-dev-server.js"></script>
    <% } %>
</body>
</html>
